package com.lyy.weather.bean;

public class ThreadFlag {
    private boolean weatherTimelyFlag=false;
    private boolean weatherHourlyFlag=false;
    private boolean weatherWeeklyFlag=false;
    private boolean lifeIndicesFlag=false;
    private boolean airIndicesFlag=false;

    //检查所有Flag是否都为true
    public boolean checkAllFlag(){
        if(weatherTimelyFlag&&weatherHourlyFlag&&weatherWeeklyFlag&&lifeIndicesFlag&&airIndicesFlag)
            return true;

        return false;
    }

    //初始化所有Flag
    public void resetAllflag(){
        weatherWeeklyFlag=false;
        weatherHourlyFlag=false;
        weatherTimelyFlag=false;
        lifeIndicesFlag=false;
        airIndicesFlag=false;
    }



    public void setWeatherTimelyFlag(boolean weatherTimelyFlag) {
        this.weatherTimelyFlag = weatherTimelyFlag;
    }

    public void setWeatherHourlyFlag(boolean weatherHourlyFlag) {
        this.weatherHourlyFlag = weatherHourlyFlag;
    }

    public void setWeatherWeeklyFlag(boolean weatherWeeklyFlag) {
        this.weatherWeeklyFlag = weatherWeeklyFlag;
    }

    public void setLifeIndicesFlag(boolean lifeIndicesFlag) {
        this.lifeIndicesFlag = lifeIndicesFlag;
    }

    public void setAirIndicesFlag(boolean airIndicesFlag) {
        this.airIndicesFlag = airIndicesFlag;
    }
}
